#! /usr/bin/env perl
# author: maxiao
# date: 2023-03-07 12:16
# descritpion: 测试堆栈开头实现元素压出

use v5.10;
use utf8;

@array = 1..10;
while (defined(@array[-1])) {
    $item = shift @array;
    print "当前从数组左侧压出的元素为：$item\n";
}

